export default{
	// 防抖函数
	debounce(fn,delay){
		let timer = null;
		return function(){
			let _this = this;
			let args = arguments;
			if(timer){clearTimeout(timer)};
			timer = setTimeout(()=>{fn.apply(_this,args)},delay)
		}
	},
	// 清空对象
	clearobj(obj){
		Object.keys(obj).forEach(item=>{
			obj[item]='';
		})
	}
}